//
// Created by iguilty on 2022-01-13.
//

#ifndef DESIGN_PATTERN_CPP_FLYWEIGHT_H
#define DESIGN_PATTERN_CPP_FLYWEIGHT_H

#include <string>
using namespace std;

class Flyweight {
public:
    virtual ~Flyweight();
    virtual void Operation(const string& extrinsicState);
    string GetIntrinsicState();

protected:
    Flyweight(string intrinsicState);

private:
    string _intrinsicState;

};

class ConcreteFlyweight:public Flyweight{
public:
    ConcreteFlyweight(string intrinsicState);
    ~ConcreteFlyweight();
    void Operation(const string& extrinsicState);
};


#endif //DESIGN_PATTERN_CPP_FLYWEIGHT_H
